home *** CD-ROM | disk | FTP | other *** search
/ Aminet 13 / Aminet 13 - August 1996.iso / Tools / Useful / TrashMaster / Docs / Trashmaster_doc < prev    next >
Text File  |  1994-07-03  |  14KB  |  340 lines

  1.  
  2.  
  3.                              TRASHMASTER V1.7
  4.  
  5.            The ultimate in byte disposal for the Amiga.
  6.  
  7.           Copyright (C) 1994 By Aric R Caley and Greywire designs
  8.  
  9.                                 3 July 1994
  10.  
  11. Who, what, where, when, why
  12. ***************************
  13.  
  14. WHO
  15. ===
  16.  
  17.    Written by Aric R Caley, AKA Dances V2.0, Dances With Coyotes, Major, Mr
  18. Coyote, and other handles/nicknames.  :) See the readme file if you wish to
  19. contact me.
  20.  
  21. WHAT
  22. ====
  23.  
  24.    See readme.guide/Readme!
  25.  
  26. WHERE
  27. =====
  28.  
  29.    Best place is in your WBStartup drawer!
  30.  
  31. WHEN
  32. ====
  33.  
  34.    The current version, 1.7, was released on 3 July 1994.  The first public
  35. release of Trashmaster was Jan 23 1992.
  36.  
  37. WHY
  38. ===
  39.  
  40.    I had always wanted to write something like this but until now, I couldnt
  41. do it.  Not that it was particularly easy to do, even under Workbench 2.0.
  42.  
  43. How I did it
  44. ************
  45.  
  46.    The main problem is with getting finicky old Workbench to stay "in sync"
  47. with the filing system..  IE, removing its icons when a file is deleted.
  48. Thanks to a new function called DeleteDiskObject(), it's possible to get
  49. workbench to remove an icon.  Unfortunately Workbench still is kinda
  50. brain-dead...  when you have it display ALL files, it spontaneously creates
  51. icons in memory for files that dont have them...  which results in
  52. DeleteDiskObject() not working (no file on disk) and Workbench not
  53. removeing the icon.  The only solution I could come up with is to
  54. PutDiskObject() and then delete this icon, which works more or less
  55. pretty well.  There are still, however, problems.  Workbench, it seems,
  56. will "lock" a directory if its window is open on the Workbench screen.
  57. This means I can't delete it until it's closed...  not too big a deal,
  58. since when you delete the icon the window closes automaticaly.  But what if
  59. something else has that directory locked?  Then I couldn't delete it
  60. after all...  that means I need to put the icon back!  heheh.  But I think
  61. I've come up with a good solution.
  62.  
  63.    Another problem is that there's no way to find out where the AppIcon is,
  64. within the WorkBench window -- so there is no way to implement a snapshot
  65. option within your application (of course, the root problem is that
  66. Workbench doesn't provide any way to "hook" into the Workbench operations
  67. like snapshot, info, etc.  See below for my solution to this).
  68.  
  69.    Finaly, one last problem exists that I couldn't fix.  If you drop a
  70. drawer onto Trashmaster that does not have a directory (but obviously has an
  71. .info), then Trashmaster can't delete it.  The reason why is that Workbench
  72. tries to get a lock on any directory icons, which it passes to Trashmaster,
  73. but since there is no directory it can't lock it.  So Trashmaster gets a
  74. message with no arguments and it can't figure things out.  This is only a
  75. minor problem.
  76.  
  77.    This seems like a good place to voice some opinions on Workbench 2.0, and
  78. what I'd like to see in the future.
  79.  
  80.    Wish list
  81.  
  82. Wish list
  83. *********
  84.  
  85.    * DiskObjects should be a BOOPSI class.
  86.  
  87.         * An "icon" class would have methods for all the normal Workbench
  88.           operations; like info, double click, delete, snapshot, copy/move,
  89.           etc.  That way, an AppIcon could give an "about" requester with
  90.           the info menu function, and behave in every way just like a
  91.           regular icon.  Say you had an icon for a network machine...  info
  92.           could put up a requester saying what the node's name was, CPU
  93.           class, whether it was Ethernet or serial, etc.  neat huh?  A
  94.           Drawer could open it's own type of list window..  perhaps one
  95.           with a "tree" display.  You could replace the standard operation
  96.           with new ones (via hooks into the DiskObject class).  This makes
  97.           Workbench extremely flexible and extendable and would allow third
  98.           party people to add tons of functionality to Workbench (I should
  99.           be able to make Workbench as powerfull as DiskMaster or DirOpus!)
  100.  
  101.         * This BOOPSI icon would be able to have more than just a bitmap
  102.           image; like actual structured drawing objects.  Of course, this
  103.           introduces the problem of how to store objects on disk.
  104.  
  105.         * Any application would now be able to use icons easily (they
  106.           dont have to have anything to do with Workbench).  You could even
  107.           drag icons from an application to a Workbench window to save
  108.           a file...
  109.  
  110.    * Clipboard support, with a "view clipboard" window.  Cut and paste icon
  111.      names/file names, icon images, etc.
  112.  
  113.    * Definable default tools for projects, with file recognition so it knows
  114.      what tool to run (in case there's no icon or the normal tool can't be
  115.      found).  And how about a small database that contains application
  116.      names and then a path to where it is?  Actualy, I guess you could have
  117.      a "Applications" directory, with icons that are linked to wherever the
  118.      app is -- and Workbench would check here first for tools.
  119.  
  120.    * "Left out" icons could be done in the same way, so that the app's icon
  121.      is still visible in it's Drawer, and so that Snapshoting the left out
  122.      icon doesn't ruin it's original coordinates.
  123.  
  124.    * Something needs to be done about the list windows..  they are slow and
  125.      clumsy, and are missing what I think is a great feature:  a "Tree"
  126.      mode.
  127.  
  128.    * Better tracking of when other apps change/add/delete files.
  129.  
  130.    * ARexx interface!
  131.  
  132.    * Built in Trashmaster :)  Built in ToolManager-like features.
  133.  
  134.    OK, I'll step down off my soapbox now!  Anyone want to help me write a
  135. Workbench replacement?  No matter, I'll just do it myself..  :) I think I
  136. will code name it - "Encino"!  In the tradition of Microsoft ("Chicago",
  137. "Cairo", etc).  Maybe I'll put in a Windows NT emulation mode (a simple
  138. AllocMem(15000000,MEMF_ANY) and a busy loop to slow things down...  :).
  139.  
  140. Installing Trashmaster
  141. **********************
  142.  
  143.    Installing Trashmaster is simple.  Just copy Trashmaster into your
  144. "WBStartup" drawer on your boot disk.
  145.  
  146.    If you want to run Trashmaster in a language other than english, check in
  147. the "catalogs/" directory for your language (you want the directory, not
  148. the *.ct file).  If it's there, then copy it to "LOCALE:catalogs/", or to
  149. whatever directory you put Trashmaster into.  If your language isn't there,
  150. then perhaps you could send me a translation and I'll put it in the next
  151. release.
  152.  
  153. Using Trashmaster
  154. *****************
  155.  
  156. Usage
  157. =====
  158.  
  159.    Trashmaster can be run from Workbench or the command line.  All options
  160. can be specified either from Tooltypes or from the command line (see
  161. Options).
  162.  
  163.    Obviously, Workbench must be running (and will be, unless you were
  164. naughty and modified your startup-sequence).  Trashmaster will open an icon
  165. on the Workbench screen; this icon will look the same as the icon you ran
  166. Trashmaster from.  BTW, the icon is supposed to look like a black hole...
  167.  
  168.    If you want to be able to format disks with Trashmaster, you must have
  169. WBStart-Handler installed in your L: directory.  The
  170. WBStart-Handler is included with ToolManager, a must-have utility, or
  171. in it's own separate distribution, both of which should be available on a
  172. Fish disk or any good FTP site, or failing that, from me.  ToolManager and
  173. WBStart are Copyright (C) 1991-94 Stefan Becker.  The default formating
  174. program is the same as Workbench's formatter.
  175.  
  176.    To use Trashmaster, simply drag files and drop them on the icon.  A
  177. requester will come up, similar to Workbench's Delete confirmation
  178. requester.  If you really want to delete the file(s) or dir(s), click
  179. OK; if not, hit CANCEL.  Remember, once you hit OK, the files are
  180. deleted..  they're gone!  For reals.  Not like the Trashcan.  If you have
  181. the VERIFYOFF tooltype set, you won't get this requester!
  182.  
  183.    One difference from the Workbench Delete, is the extra option for
  184. Interactive deletion.  With interactive delete, you will get a confirmation
  185. requester for each file you dropped into Trashmaster.  For each file, you
  186. can choose to either delete it, delete all the rest of the files
  187. non-interactively, skip this file, or abort completely.
  188.  
  189.    If Trashmaster comes across a file that is protected from deletion, it
  190. will bring up a requester with two options, FORCE and CANCEL.  If you
  191. select FORCE, Trashmaster will un-protect the file and delete it!
  192. Selecting CANCEL will of course cancel the operation.  If you have the
  193. FORCE option set, you won't get this requester, the file will simply be
  194. deleted without warning.
  195.  
  196.    To quit Trashmaster (which you dont really want to do, do you?  :),
  197. double click the AppIcon and select the remove option.
  198.  
  199.    If you want Trashmaster started automaticly (you DO, dont you?), place it
  200. into the "WBStartup" drawer on your boot disk.
  201.  
  202. Options
  203. *******
  204.  
  205.    For a description of the Format and Template lines used below, see
  206. Formats and Templates.
  207.  
  208. Format: ICON <name>
  209. Template: ICON/K
  210.      This is the name of a custom icon to be used instead of the default
  211.      icon (the default being Trashmaster's icon)
  212.  
  213. Format: NAME <name>
  214. Template: NAME/K
  215.      Set this to change the name under Trashmaster's AppIcon.
  216.  
  217. Format: FORMATTER <name>
  218. Template: FORMATTER/K
  219.      Set to the name of the disk-formatting program of your choice.  The
  220.      program will be started as a Workbench application and passed the disk
  221.      icon to format.
  222.  
  223. Format: VERIFYOFF
  224. Template: VERIFYOFF/S
  225.      If set, the initial verification requester will not appear.  The
  226.      action performed will be the one defined by the TYPE tooltype.  Use
  227.      at your own risk.  Note: This tooltype has been changed from
  228.      previous versions of Trashmaster.
  229.  
  230. Format: TYPE = <INTERACTIVE>
  231. Template: TYPE/K
  232.      Applicable only when VERIFYOFF is set.  If set to INTERACTIVE,
  233.      deletes will default to interactive deletes (requireing confirmation
  234.      for every file and directory).
  235.  
  236. Format: FORCE
  237. Template: FORCE/S
  238.      If set, files that have their protection flags set to delete-protected
  239.      will be deleted without warning.  Otherwise, you'll get a requester
  240.      whenever you try to delete a protected file.  Note: This tooltype
  241.      has been changed from previous versions of Trashmaster.
  242.  
  243. Format: X <n>
  244. Template: X/N
  245.      This is the X coordinate of the AppIcon.  A -1 will tell workbench to
  246.      find a suitable place for the icon.
  247.  
  248. Format: Y <n>
  249. Template: Y/N
  250.      This is the Y coordinate of the AppIcon.  A -1 will tell workbench to
  251.      find a suitable place for the icon.
  252.  
  253.        VERIFYOFFTYPE and FORCE can work in conjuction.  If you
  254. don't want any anoying verification requesters, you can set
  255. VERIFYOFFTYPE to nothing (leave it out), and FORCE.    If you
  256. always want interactive deletes, set VERIFYOFF and TYPE to
  257. INTERACTIVE.
  258.  
  259.    Be carefull with these!  If you turn off verification and use the
  260. FORCE option, anything that gets dropped on TrashMaster will be
  261. simply deleted without warning, even if it's protected from deletion.
  262.  
  263. Formats and Templates
  264. *********************
  265.  
  266. Format
  267. ======
  268.  
  269.    Commands are described with a Format and a Template.  In a Format
  270. specification, the arguments are surounded by brackets to indicate the type
  271. of argument.  The brackets are not typed as part of the command.
  272.  
  273. < >
  274.      Angle brackets are used to indicate that this argument is
  275.      required; it must be provided or the command will fail.
  276.  
  277. [ ]
  278.      Square brackets indicate that the argument is optional.  The command
  279.      will run with or without these arguments.
  280.  
  281. { }
  282.      Braces indicate that this argument may be given more than once.
  283.  
  284. |
  285.      The vertical bar separates multiple options, only one of which may be
  286.      specified (mutualy exclusive).
  287.  
  288. Template
  289. ========
  290.  
  291.    Templates are a more compact, concise version of Formats (both have their
  292. uses).  Templates are directly supported by the Amiga OS.  Their main
  293. advantage is that they specify the type of data each argument will (should)
  294. be.  Each argument is separated with a comma, and has a specifier code at
  295. the end (always a '/' with a letter).  These are the codes currently
  296. supported:
  297.  
  298. /A
  299.      Always required.  This argument MUST be given or the command will fail.
  300.      This is equivalent to the Format specifier "< >".
  301.  
  302. /F
  303.      Final argument.  The entire rest of the line, regardless of any
  304.      keywords or spaces that may appear in it, is taken as the argument
  305.      string.
  306.  
  307. /K
  308.      Keyword.  This option will only be filled if this keyword appears in
  309.      the command line.
  310.  
  311. /M
  312.      Multiple arguments.  This argument will accept any number of strings.
  313.      Anything not matching another option will be added to this option.
  314.      Only one /M will be specified.
  315.  
  316. /N
  317.      Number.  The argument is a decimal number.
  318.  
  319. /S
  320.      Switch.  The argument is a boolean switch.  If it is specified, the
  321.      option is true, if it is missing, the option is false (default).
  322.  
  323. =
  324.      This is used to provide an abbreviation.  OPT=OPTION means that this
  325.      option can be specified with either OPT or OPTION.
  326.  
  327.    If for some reason you need to specify an argument string (for instance,
  328. a file name) that is the same as one of the options, enclose it in quotes.
  329. For example:
  330.  
  331.    Hypothetical command Template: SHOW NAME/A
  332.  
  333.    You type at the shell:
  334.  
  335.          >show name "name"
  336.  
  337.    If you had a file called "name" (I won't ask why...  ), that is how you'd
  338. do it.
  339.  
  340.